

<template>
    <van-config-provider :theme-vars="themeVars">
    <div class="eee">asd</div>
        <RouterView />
    </van-config-provider>

</template>
<script setup lang="ts">
import { reactive } from 'vue';

let hrt = document.documentElement.clientHeight + 'px'; // 获取当前可视区域的高度存到hrt变量
window.onload = function () {
    // 在页面整体加载完毕时 解决ios键盘抬起改变浏览器视图高度，影响绝对定位问题
    if (document.getElementById("app")) {
        // 把获取到的高度赋值给根div
        document.getElementById("app")?.setAttribute('height', hrt)
    }
};
const themeVars  = reactive({
    // primaryColor:'red',
    //   rateIconFullColor: '#07c160',
    //   sliderBarHeight: '4px',
    //   sliderButtonWidth: '20px',
    //   sliderButtonHeight: '20px',
    //   sliderActiveBackgroundColor: '#07c160',
    //   buttonPrimaryBorderColor: '#07c160',
    //   buttonPrimaryBackgroundColor: '#07c160',
    })

    setTimeout(() => {
            document.body.style.setProperty("--van-primary-color", '#07c160');
    }, 7000);
</script>
<style>
@import '@/assets/base.css';
.eee{
    color: var(--van-primary-color);
}
</style>
